import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:mpflutter_template/demo/common_controller.dart';
import 'package:mpflutter_template/demo/icon_config_default.dart';

import 'color_constant.dart';

class AssessoryCabinePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final controller = Get.put(CommController());
    return Container(
      height: 50,
      margin: const EdgeInsets.only(left: 12, right: 12,top: 8),
      decoration:
          BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(8)),color: ColorConstant.white,),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Container(
            width: 60,
            height: 20,
            margin: const EdgeInsets.only(left: 16),
            alignment: Alignment.center,
            decoration: BoxDecoration(
                border: Border.all(color: ColorConstant.ff85cf26, width: 1),
                borderRadius: BorderRadius.all(Radius.circular(2))),
            child: Text(
              '附近柜机',
              style: TextStyle(
                  fontSize: 12,
                  color: ColorConstant.ff85cf26,
                  fontWeight: FontWeight.w400),
            ),
          ),
          Expanded(
              child:Container(
                alignment: Alignment.centerLeft,
                margin: const EdgeInsets.only(left: 8),
                child: GetBuilder(
                  init: controller,
                  global: false,
                  builder: (controller) {
                    return Text("未来智慧城别墅柜",
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(
                            fontSize: 12,
                            color: ColorConstant.ff333333,
                            fontWeight: FontWeight.w400));
                  },
                ),
              )
          ),
          Container(
            width: 20,
            height: 20,
            margin: const EdgeInsets.only(right: 16),
            child:
                Image.asset(IconAssetsDefault.rightArrow, fit: BoxFit.contain),
          )
        ],
      ),
    );
  }
}
